package config

import (
	"github.com/pelletier/go-toml"
	"io/ioutil"
)

func (cm *Manager) loadTOML(filePath string) error {
	data, err := ioutil.ReadFile(filePath)
	if err != nil {
		return err
	}

	var parsedData interface{}
	err = toml.Unmarshal(data, &parsedData)
	if err != nil {
		return err
	}

	cm.data["toml"] = parsedData
	return nil
}
